#!/usr/bin/env python3

n = 10

l = list(range(n))

for r in range(n):
    l[r] = list(range(n))
    for c in range(n):
        if c == 0 or r == 0 or c == n - 1 or r == n - 1:
            l[r][c] = '#'
        else:
            l[r][c] = ' '

        #  l[r][c] = '*' if c >= r else ' '

for r in range(n):
    print(' '.join(l[r]))

